package com.lyeducation.core.course;

import com.lyeducation.controllers.dto.ChapterDTO;
import com.lyeducation.controllers.dto.ChapterInfoIndexDTO;
import com.lyeducation.core.base.BaseService;
import com.lyeducation.entities.course.ChapterEntity;
import com.lyeducation.util.controllerUtil.JsonResult;

import java.util.Map;

/**
 * @Author Sky1in3
 */
public interface ChapterService extends BaseService<ChapterEntity> {
    /**
     * 软删除 章节1-n视频
     *
     * @param chapterId
     * @return
     */
    JsonResult delChapter(String chapterId);

    /**
     * 新增章节
     */
    ChapterDTO addChapter(ChapterDTO chapterDTO);

    /**
     * 首页章节详情
     */
    ChapterInfoIndexDTO chapterInfoIndex(String openid, String chapterId);

    /**
     * 章节详情
     */
    Map<String, Object> chapterInfo(String chapterId);

    /**
     * 修改章节
     */
    ChapterDTO updateChapter(ChapterDTO chapterDTO);

    /**
     * 删除章节
     */
    boolean deleteChapter(String chapterId);

    /**
     * 章节列表
     */
    Map<String, Object> chapterEntityList(String courseId);
}
